<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jstl/core">

    <body>

        <ui:component>
            <script>
                function showHide(){
                    document.getElementById('over').style.display='none';
                    document.getElementById('on').style.display='inline';
                }
                function hideShow(){
                    document.getElementById('on').style.display='none';
                    document.getElementById('over').style.display='inline';
                }
            </script>
            <div id="login" style="text-align:right">

                <form method="POST" action="j_security_check">

                    <ice:outputLabel value="Usuario:"/><input type="text" name="j_username" />
                    <ice:outputLabel value="Contraseña:"/><input type="password" name="j_password" />
                    <input id="over" class="littleButton" type="image" onmouseover="javascript:showHide();" src="#{facesContext.externalContext.requestContextPath}/images/control-power.png" />
                    <input id="on" class="littleButton" type="image" onmouseout="javascript:hideShow();" src="#{facesContext.externalContext.requestContextPath}/images/control-power-red.png" style="display:none"/>

                    <c:if test="#{!empty param.error}">
                    <div style="margin-right:16px"><ice:outputLabel styleClass="errorMessage" value="Error: usuario y/o contraseña erroneos. Vuelva a intentarlo."/></div>
                    </c:if>

                </form>
            </div>
        </ui:component>

    </body>
</html>

